﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UILocalizacionListGrid.ascx.cs" 

Inherits="UILGestion.Admin.UILocalizacion.UILocalizacionListGrid" %>
<script type="text/javascript">
    function SelectAll(frm, id) {

        var frm = document.getElementById("itemPlaceHolderContainer");
        for (i = 1; i < frm.rows.length; i++) {
            var checkbox = frm.rows[i].cells[0].childNodes[1];
            if (checkbox != null)
                checkbox.checked = document.getElementById(id).checked;
        }
    };
    </script>

<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc1" %>

<asp:Panel runat="server" ID="PanelRecepcion" >
<asp:DataPager ID="pager" PagedControlID="ListView1" runat="server" >
    <Fields>
      <cc1:PagerField NextPageImageUrl="~/Images/arrow_right2.gif" PreviousPageImageUrl="~/images/arrow_left.gif" />
    </Fields>
</asp:DataPager>
<asp:ListView ID="ListView1" runat="server" OnDataBound="ListView1_DataBound" ClientIDMode="Static"
    DataKeyNames="idInternal" onitemdatabound="ListView1_ItemDataBound">
    <LayoutTemplate>
        <table id="itemPlaceHolderContainer" border="0" runat="server" class="ms-crm-List-Header">
            <tr id="Tr1" runat="server">
                   <th>
                  <asp:CheckBox runat="server" ID="chkSelectAll" ClientIDMode="Static" onclick="SelectAll('ListView1','chkSelectAll')" />
                 </th>  
                           
                <th id="Th2" runat="server">
                    <asp:LinkButton ID="LinkButton1" CommandName="Sort" CommandArgument="nombreVenta" runat="server" ForeColor="Blue">DESCRIPCION</asp:LinkButton>
                </th>
                
                <th id="Th9" runat="server">
                    <asp:LinkButton ID="LinkButton7" CommandName="Sort" CommandArgument="nombreConst" runat="server" ForeColor="Blue">AREA</asp:LinkButton>
                </th>
               
                <th id="Th1" runat="server">
                    <asp:LinkButton ID="LinkButton2" CommandName="Sort" CommandArgument="cantidadItem" runat="server" ForeColor="Blue">PISO/BLOQ.</asp:LinkButton>
                </th>

                 <th id="Th8" runat="server">
                    <asp:LinkButton ID="LinkButton6" CommandName="Sort" CommandArgument="cantidadItem" runat="server" ForeColor="Blue">COMENTARIO</asp:LinkButton>
                </th>
                
                  <th id="Th3" runat="server">
                    <asp:LinkButton ID="LinkButton3" CommandName="Sort" CommandArgument="etapaStr" runat="server" ForeColor="Blue">ETAPA</asp:LinkButton>
                </th>
                <th id="Th14" runat="server" align="right">
     
                </th>
     
                
            </tr>
            <tr id="itemPlaceholder" runat="server">
            </tr>
        </table>



    </LayoutTemplate>
    <ItemTemplate>
        <tr style='background-color: <%# (Container.DataItemIndex % 2 == 0)?"#fff":"#eee" %>'>

        
         <td>
             <asp:CheckBox runat="server" ID="chkEmployeeSelector"  />
         </td>
           <td width="250px">
               <asp:Hyperlink runat= "server"  ForeColor="Blue"
                Text='<%# DataBinder.Eval(Container.DataItem,"descripcion").ToString()%>'  
                 Target="_self"  ID="Hyperlink1"
                NavigateUrl='<%# "~/Admin/UILocalizacion/UILocalizacionReadForm.aspx?id=" + 
                DataBinder.Eval (Container.DataItem,"idInternal").ToString()  +
                "&idEtapa=" + DataBinder.Eval (Container.DataItem,"idEtapa").ToString()
                %>' 
               />   
            </td>
             <td  align="right" width="70px">
                 <%# Eval("areaStr")%> <br />
            </td>
            <td  align="right" width="70px">
                 <%# Eval("totalPisoStr")%> <br />
            </td>
             <td  align="right" >
                 <%# Eval("comentario")%> <br />
            </td>
                   <td  align="right" width="150px">
                 <%# Eval("etapaStr")%> <br />
            </td>        
            
          <td width="45px" align="right">
                

                <asp:ImageButton ID="lnkRemove" runat="server" BorderColor="Control" 
                     CommandArgument='<%# Eval("idInternal")%>' ImageUrl="../../Images/delete.gif" 
                     OnClick="Deleteitem" OnClientClick="return confirm('Usted quiere eliminar?')" />
                                        
                 
            </td>
        </tr>
    </ItemTemplate>
    <EmptyDataTemplate>
        <table id="Table1" runat="server" >
            <tr>
                <td>
                   <h2 style="font-size: x-small; color: #960818">
                        No existe Informacion.</h2>
                </td>
            </tr>
        </table>
    </EmptyDataTemplate>
</asp:ListView>



</asp:Panel>

    
     